package com.diandian.backend.store.param;

import com.diandian.base.boot.starter.exception.DefaultException;

import java.io.Serializable;
import java.util.List;

public class OfflineStoreBatchAddParam implements Serializable {

	private String orgId;
	private String orgCode;
	private String belong;
	private List<OfflineStoreBatchAddParamItem> stores;

	public void check(){
		if(this.belong == null || "".equals(this.belong)){
			throw new DefaultException("归属不能为空");
		}
		if(this.stores == null || this.stores.size() == 0){
			throw new DefaultException("数据不能为空");
		}
		if(this.stores.size() > 100){
			throw new DefaultException("每次同步数量不能超过100");
		}
	}

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getBelong() {
		return belong;
	}

	public void setBelong(String belong) {
		this.belong = belong;
	}

	public List<OfflineStoreBatchAddParamItem> getStores() {
		return stores;
	}

	public void setStores(List<OfflineStoreBatchAddParamItem> stores) {
		this.stores = stores;
	}
}
